<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head>
    <%@ include file="header.jsp"%>
    <link rel="stylesheet" href="../ac/js/swiper/css/swiper.min.css">
    <script src="../ac/js/swiper/js/swiper.min.js"></script>
    <script>
    	function browserRedirect() {
            var sUserAgent = navigator.userAgent.toLowerCase();
            var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
            var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
            var bIsMidp = sUserAgent.match(/midp/i) == "midp";
            var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
            var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
            var bIsAndroid = sUserAgent.match(/android/i) == "android";
            var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
            var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
            if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid ) {
                window.location.href = '/ac/mobile/';
            }
        }
        browserRedirect();
        $(function () {
            var swiper = new Swiper('.swiper-container', {
                spaceBetween: 30,
                centeredSlides: true,
                autoplay: {
                    delay: 20000,
                    disableOnInteraction: false,
                },
                pagination: {
                    el: '.swiper-pagination',
                    clickable: true,
                }
            });
            $('.tab').on('click','.tabBtn li',function(){
                var $this = $(this),
                    $tab = $(this).parents('.tab').eq(0),
                    index = $tab.find('.tabBtn li.active').index();
                $tab.find('.tabBtn li').removeClass('active');
                $this.addClass('active');
                $tab.find('.tabCont').removeClass('active').eq(index).addClass('active');
            });
            $('.tab').on('click','.leftBtn,.rightBtn',function(){
                var $this = $(this),
                    $tab = $(this).parents('.tab').eq(0),
                    index = $tab.find('.tabBtn li.active').index(),
                    len =  $tab.find('.tabBtn li').length;
                if($this.hasClass('leftBtn')){
                    index--;
                    if(index<0) return;
                }else{
                    index++;
                    if(index>=len) return;
                }
                $tab.find('.tabBtn li').removeClass('active');
                $tab.find('.tabBtn li').eq(index).addClass('active');
                $tab.find('.tabCont').removeClass('active').eq(index).addClass('active');
            })
        })
    </script>
</head>
<body class="index_new">
    <%@ include file="top.jsp"%>
    <div class="mainBody">
        <!-- Swiper -->
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide"><img src="../ac/image/index_new/banner1.jpg" alt=""></div>
                <div class="swiper-slide"><img src="../ac/image/index_new/banner2.jpg" alt=""></div>
                <div class="swiper-slide"><img src="../ac/image/index_new/banner3.jpg" alt=""></div>
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
        </div>
        <div class="mainContent">
            <div class="left gsdt">
                <h2 class="title">新闻动态</h2>
                <ul class="wz-list">
                <c:forEach items="${data.result}" var="item" >
                    <li><a href="/ac/detail?messageId=${item.messageId}"><i class="icon"></i><span class="time">
                    <fmt:parseDate value="${item.issueTime}" pattern="yyyy-MM-dd" var="d"/>
                    <fmt:formatDate value="${d}" pattern="yyyy-MM-dd" var="timeStr"/>  
                    ${timeStr}
                    </span>${item.articleTitle}</a></li>
                  </c:forEach>
<!--                     <li><a href="content3.html"><i class="icon"></i><span class="time">2018-01-03</span>优办公司正式启动即时服务工作组的通知</a></li>
                    <li><a href="content1.html"><i class="icon"></i><span class="time">2017-12-25</span>中共中央 国务院关于深入推进农业供给侧结构性改革 加快培育农业农村发展新动能的若干意见</a></li>
                    <li><a href="content2.html"><i class="icon"></i><span class="time">2017-12-25</span>中国人民银行关于对 普惠金融实施定向降准的通知</a></li>
                    <li><a href="content2.html"><i class="icon"></i><span class="time">2017-12-25</span>中国人民银行关于对 普惠金融实施定向降准的通知</a></li> -->
                    <li><a href="/ac/more?current=1&size=10"><i class="icon"></i><span class="time">查看更多动态&gt;&gt;</span></a></li>
                </ul>
            </div>
            <div class="right tsyb">
                <h2 class="title">图说优办</h2>
                <div class="tab">
                    <div class="tabCont active">
                        <img src="../ac/image/index_new/pic1.png" alt="办公环境">
                    </div>
                    <div class="tabCont">
                        <img src="../ac/image/index_new/pic2.png" alt="办公环境">
                    </div>
                    <div class="tabCont">
                        <img src="../ac/image/index_new/pic3.png" alt="办公环境">
                    </div>
                    <ul class="tabBtn">
                        <li class="active"></li>
                        <li></li>
                        <li></li>
                    </ul>
                    <a href="javascript:void(0);" class="leftBtn"></a>
                    <a href="javascript:void(0);" class="rightBtn"></a>
                </div>
            </div>
        </div>
    </div>
    <%@ include file="footer.jsp"%>
</body>
</html>